#include<stdio.h>
#include<stdlib.h>

void print(int **, int);//打印关系矩阵
void reflexive(int **, int, int **);//闭包运算
int main(void)
{
    int n, i, j;
    //输入关系矩阵阶数
    printf("请输入关系矩阵阶数:");
    scanf("%d", &n);
    getchar();
    int **origin = (int **)calloc(n, sizeof(int*));
    if (origin == NULL)
    {
        perror("calloc");
        return -1;
    }
    for (i = 0; i < n; i++)
    {
        origin[i] = (int *)calloc(n, sizeof(int));
        if (origin[i] == NULL)
        {
            perror("calloc");
            return -1;
        }
    }
    for (i = 0; i < n; i++)
        for (j = 0; j < n; j++)
            scanf("%d", &origin[i][j]);
    // print(origin, n);

    return 0;
}
void print(int **arr, int n)
{
    int i, j;
    for (i = 0; i < n; i++)
    {
        for (j = 0; j < n; j++)
            printf("%d ", arr[i][j]);
        printf("\n");
    }
}
void reflexive(int **origin, int n, int **aim1)
{
    int i, j;
    for (i = 0; i < n; i++)
    {
        origin[i][i] = 1;
    }
}